Skip to content

Add test-mode animation switch for UI tests - #6232

Merged
j0ntz merged 2 commits into
developfrom
jon/xcuitest-interpreter
Oct 9, 2026
Merged

j0ntz merged 2 commits into
developfrom
jon/xcuitest-interpreter

Conversation

@j0ntz

@j0ntz j0ntz commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Asana task

Adds a test-mode animation switch for automated iOS UI runs. Debug iOS builds read the EdgeTestAnimations user default, which the -EdgeTestAnimations off|fast launch argument sets:

  • off: UIKit animations are disabled (UIView.setAnimationsEnabled(false)).
  • fast: the window's Core Animation clock runs at 100x.
  • Either value also mounts Reanimated's ReducedMotionConfig with ReduceMotion.Always, so withRepeat loops (Shimmer, ShimmerCard, SwipeChart) stop after one cycle.
  • Either value also freezes UIActivityIndicatorView spinners in place (a one-time startAnimating swizzle that sets the indicator layer's speed to 0), so a loading screen stays visible but stops changing.

Together these let screenshot comparisons settle between automated steps. The app has no Lottie and no Animated.loop.

Release builds and Android ignore the switch, and a normal debug launch (no argument) is unchanged. RN core Animated is only used for finite fades, so it needs no change.

The XCUITest flow interpreter in the edge-dev-agents PR passes -EdgeTestAnimations off by default and --animations on clears it.

A second commit adds AGENT_TEST_MODE, a boolean in config.json (default false) for builds that automated agents drive. With it on:

  • Login skips the survey modal, the notification permission reminder, the security alerts scene and the Electrum server deprecation notice (the settings write behind that notice still runs).
  • The password recovery reminder does not open.
  • SceneWrapper leaves out the NotificationView, so no notification cards show.
  • console.warn goes to console.log, so warnings never raise the LogBox toast. Errors still raise it.

The key is separate from ENABLE_MAESTRO_BUILD, so the QA Maestro suite is unaffected.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

No visual change in normal builds. Tested on an iOS simulator debug build (base 2efa138):

  • Every interpreter run used -EdgeTestAnimations off; all 12 harness library flows pass.
  • Spinner check on the Dev Tab's permanent-spinner button: waitForAnimationToEnd settled in 0.16s with the switch off and ran to its 5s timeout with animations on. The attached frame shows the frozen spinner still on screen.
  • Same build, both modes: login-if-needed 7.86s on / 7.82s off, open-settings 2.01s on / 2.09s off, all passing. buy-quote on an earlier build: 28.9s on / 28.7s off.
  • verify-repo (eslint, jest) passes.
  • AGENT_TEST_MODE commit: tsc and jest pass (817 tests, with a new checkPasswordRecovery case). It has not been run on a device.

Test evidence

b509576
Add test-mode animation switch for UI tests
2026-10-01

11. frozen spinner animations off

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@peachbits peachbits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One non-blocking suggestion:

In dev builds, ReducedMotionConfig logs Reduced motion setting is overwritten with mode 'always'. through console.warn on mount. Unless LOGBOX_DISABLE is set, that shows a LogBox warning toast at the bottom of the screen on every test-mode launch, over the tab bar, which works against letting screenshots settle. Consider adding the message to the LogBox.ignoreLogs list in src/app.ts so test runs don't depend on LOGBOX_DISABLE being set.

@j0ntz

j0ntz commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Not changed in this PR. The LogBox.ignoreLogs suggestion for the ReducedMotionConfig warning is recorded on the task as a possible followup.

j0ntz added 2 commits October 9, 2026 15:54
Debug iOS builds read the EdgeTestAnimations user default (the
-EdgeTestAnimations launch argument). off turns UIKit animations off
and fast runs the window's Core Animation clock 100x. Either value
also mounts Reanimated's ReducedMotionConfig with ReduceMotion.Always,
so withRepeat loops (Shimmer, ShimmerCard, SwipeChart) stop after one
cycle, and freezes UIActivityIndicatorView spinners in place, so
screenshots settle between automated steps. RN core Animated is only
used for finite fades here, so it needs no change. Release builds and
Android ignore the switch.
With AGENT_TEST_MODE true in config.json, login skips the survey modal,
the notification permission reminder, the security alerts scene and the
Electrum server deprecation notice (its settings write still runs). The
password recovery reminder stays quiet, SceneWrapper leaves out the
NotificationView, and console.warn goes to console.log so warnings never
raise the LogBox toast. Errors still raise it. The key defaults to false
and is separate from ENABLE_MAESTRO_BUILD, which the QA Maestro suite
uses.
@j0ntz
j0ntz force-pushed the jon/xcuitest-interpreter branch from 3a142cd to 910d550 Compare October 9, 2026 23:01
@j0ntz
j0ntz merged commit 2bb848b into develop Oct 9, 2026
7 checks passed
@j0ntz
j0ntz deleted the jon/xcuitest-interpreter branch October 9, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants